package com.haixiaoke.saas.repository.service.impl;

import java.util.List;

import com.haixiaoke.saas.repository.pojo.MetroLineStation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haixiaoke.saas.repository.mapper.MetroLineStationMapper;
import com.haixiaoke.saas.repository.service.IMetroLineStationService;

/**
 * 地铁线路和车站关联Service业务层处理
 *
 * @author haixiaoke
 * @date 2023-04-07
 */
@Service
public class MetroLineStationServiceImpl implements IMetroLineStationService {
    @Autowired
    private MetroLineStationMapper metroLineStationMapper;

    /**
     * 查询地铁线路和车站关联
     *
     * @param id 地铁线路和车站关联主键
     * @return 地铁线路和车站关联
     */
    @Override
    public MetroLineStation selectMetroLineStationById(Long id) {
        return metroLineStationMapper.selectMetroLineStationById(id);
    }

    /**
     * 查询地铁线路和车站关联列表
     *
     * @param metroLineStation 地铁线路和车站关联
     * @return 地铁线路和车站关联
     */
    @Override
    public List<MetroLineStation> selectMetroLineStationList(MetroLineStation metroLineStation) {
        return metroLineStationMapper.selectMetroLineStationList(metroLineStation);
    }

    @Override
    public List<MetroLineStation> selectMetroLineStationByMetroLineId(Long metroLineId) {
        return metroLineStationMapper.selectMetroLineStationByMetroLineId(metroLineId);
    }

    /**
     * 新增地铁线路和车站关联
     *
     * @param metroLineStation 地铁线路和车站关联
     * @return 结果
     */
    @Override
    public int insertMetroLineStation(MetroLineStation metroLineStation) {
        return metroLineStationMapper.insertMetroLineStation(metroLineStation);
    }

    @Override
    public int insertMetroLineStations(List<MetroLineStation> metroLineStations) {
        return metroLineStationMapper.insertMetroLineStations(metroLineStations);
    }

    /**
     * 修改地铁线路和车站关联
     *
     * @param metroLineStation 地铁线路和车站关联
     * @return 结果
     */
    @Override
    public int updateMetroLineStation(MetroLineStation metroLineStation) {
        return metroLineStationMapper.updateMetroLineStation(metroLineStation);
    }

    /**
     * 批量删除地铁线路和车站关联
     *
     * @param ids 需要删除的地铁线路和车站关联主键
     * @return 结果
     */
    @Override
    public int deleteMetroLineStationByIds(Long[] ids) {
        return metroLineStationMapper.deleteMetroLineStationByIds(ids);
    }

    /**
     * 删除地铁线路和车站关联信息
     *
     * @param id 地铁线路和车站关联主键
     * @return 结果
     */
    @Override
    public int deleteMetroLineStationById(Long id) {
        return metroLineStationMapper.deleteMetroLineStationById(id);
    }

    @Override
    public int updateMetroLineStationBatch(List<MetroLineStation> metroLineStations) {
        return metroLineStationMapper.updateMetroLineStationBatch(metroLineStations);
    }
}
